<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改车辆主要信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-carmain-edit" th:object="${tbCarMain}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">vin码(主键)：</label>
                <div class="col-sm-8">
                    <input name="vin" th:field="*{vin}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">车型ID(外键)：</label>
                <div class="col-sm-8">
                    <input name="carTypeId" th:field="*{carTypeId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">车辆种类：</label>
                <div class="col-sm-8">
                    <input name="carKindId" th:field="*{carKindId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">规约：</label>
                <div class="col-sm-8">
                    <input name="appoint" th:field="*{appoint}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">生产厂商：</label>
                <div class="col-sm-8">
                    <input name="vendor" th:field="*{vendor}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">生产批次：</label>
                <div class="col-sm-8">
                    <input name="vendorBatch" th:field="*{vendorBatch}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">车辆状态(0:未销售;1:已销售;2:报废)：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <select name="carStatus">
                            <option value="0">未销售</option>
                            <option value="1">已销售</option>
                            <option value="2">报废</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">车辆预配置id：</label>
                <div class="col-sm-8">
                    <input name="configId" th:field="*{configId}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "carmain/carmain";
        $("#form-carmain-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-carmain-edit').serialize());
            }
        }
    </script>
</body>
</html>
